from django.conf.urls.defaults import patterns
from views import index, register, auth, profile, event


urlpatterns = patterns('',
    (r'^$', index),
    (r'^register/$', register),
    (r'^login/$', auth.login),
    (r'^login/openid/$', auth.login_openid),
    (r'^login/openid/(?P<url>.+)$', auth.login_openid_server),
    (r'^process/openid/$', auth.process_openid),
    (r'^process/vkontakte/$', auth.process_vkontakte),
    (r'^process/facebook/$', auth.process_facebook),
    (r'^logout/$', auth.logout),
    (r'^profile/$', profile.details),
    (r'^profile/edit/$', profile.edit),
    (r'^profile/add_city/$', profile.add_city),
    (r'^profile/remove_city/$', profile.remove_city),
    (r'^event/create/$', event.create),
    (r'^event/(?P<id>\d+)/$', event.details),
    (r'^event/(?P<id>\d+)/edit/$', event.edit),
    (r'^event/(?P<id>\d+)/cancel/$', event.cancel),
    (r'^event/list/$', event.list),
    (r'^event/(?P<id>\d+)/join/$', event.join),
    (r'^event/(?P<id>\d+)/leave/$', event.leave),
    (r'^event/(?P<id>\d+)/participation/$', event.change_participation_terms),
    (r'^event/(?P<id>\d+)/create_discuss/$', event.create_discussion),
    (r'^discussion/(?P<id>\d+)/$', event.discussion),
    (r'^discussion/(?P<id>\d+)/add/$', event.add_message),
)
